'use strict';

stareal
    .controller("ViewsController", function ($scope, $stateParams, $api, $state, $alert, localStorageService,$interval,$window,$lazyLoader,$timeout) {
      //我的观演记列表  app/view/mylist
        $scope.viewLists = new $lazyLoader("app/view/mylist", {flag:1},true);
        //删除
        $scope.viewdelete=function(id){
            $api.post("app/view/delete",{viewid:id},true)
                .then(function (ret) {
                    if(ret.retCode==0){
                        $alert.show('删除成功！');
                        $timeout(location.reload(),2000);
                        // location.reload();
                    }
                })
        }
    });